package com.tm.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tm.entity.CategoryEntity;
import com.tm.mapper.CateGoryMapper;
import com.tm.service.CateGoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author huangp
 * @create 2023-04-04 13:55
 */
@Service
public class CateGoryServiceImpl extends ServiceImpl<CateGoryMapper, CategoryEntity> implements CateGoryService {


    @Override
    public Page<CategoryEntity> pageList(Integer currPage, Integer pageSize) {
        Page<CategoryEntity>  pagelist= new Page<>(currPage,pageSize);
        Page<CategoryEntity>  pagelist1= super.page(pagelist);
        return pagelist1;
    }

    @Override
    public Boolean addCategory(CategoryEntity categoryEntity) {
        Boolean flag = super.save(categoryEntity);
        return flag;
    }



}
